class  MyArray<T>{
    public Object[] array = new Object[10];

    public void setArray(int pos,T Val){
        this.array[pos]=Val;
    }

    public T getArray(int pos){
        return (T) this.array[pos];
    }
}
public class Test {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setArray(0,10);
        int ret = myArray.getArray(0);
        System.out.println(ret);
        System.out.println("==============");
        MyArray<String> myArray2 = new MyArray<>();
        myArray2.setArray(1,"hehe");
        String ret2 = myArray2.getArray(1);
        System.out.println(ret2);
    }
}
